@extends('admin.base')

@section('css')
@parent
<!--选择框-->
<link href="/adminv/css/plugins/iCheck/custom.css" rel="stylesheet">

<!--文件上传-->
<link rel="stylesheet" type="text/css" href="/webuploader/webuploader.css">
<link rel="stylesheet" type="text/css" href="/webuploader/webuploaderdemo.css">
<!--IOS7checkbox-->
<link href="/adminv/css/plugins/switchery/switchery.css" rel="stylesheet">
<!--标签选择-->
<link href="/adminv/css/plugins/chosen/chosen.css" rel="stylesheet">

@stop



@section('page-header')
<div class="row wrapper border-bottom white-bg page-heading">
    <div class="col-sm-4">
        <h2>写博客</h2>
        <ol class="breadcrumb">
            <li>
                <a href="{{route('adminhome')}}">主页</a>
            </li>
            <li>
                <strong>撰写博客</strong>
            </li>
        </ol>
    </div>
    <div class="col-sm-8">
        <div class="title-action">
            <a href="empty_page.html" class="btn btn-primary">发表</a>
        </div>
    </div>
</div>
@stop

@section('content')
<div class="row">
    <div class="col-lg-12">
        <div class="ibox float-e-margins">
            <div class="ibox-title">
                <h5>撰写博客
                    <small>深呼吸，想想该写点啥吧</small>
                </h5>
                <div class="ibox-tools">
                    <a class="collapse-link">
                        <i class="fa fa-chevron-up"></i>
                    </a>
                </div>
            </div>

            <div class="ibox-content">
                <form method="post" class="form-horizontal">
                    <div class="form-group">
                        <label class="col-sm-2 control-label">标题</label>

                        <div class="col-sm-4">
                            <input type="text" class="form-control">
                        </div>
                        <div class="col-sm-4">
                            <div class="checkbox i-checks">
                                <label>
                                    <input type="checkbox" value=""> <i></i> 转载</label>
                            </div>
                        </div>
                    </div>

                    <!--选择按钮 是否启用配图-->
                    <!--文章配图-->
                    <div class="form-group">
                        <label class="col-sm-2 control-label">配图</label>

                        <div class="col-sm-10">
                            <input type="checkbox" class="js-switch"/>
                        </div>
                    </div>
                    <div class="form-group peitu" style="display: none">
                        <div class="col-sm-10 col-sm-offset-1">
                            <div id="uploader" class="wu-example">
                                <div class="queueList">
                                    <div id="dndArea" class="placeholder">
                                        <div id="filePicker"></div>
                                        <p>或将照片拖到这里，图片越清晰越好哦~</p>
                                    </div>
                                </div>
                                <div class="statusBar" style="display:none;">
                                    <div class="progress">
                                        <span class="text">0%</span>
                                        <span class="percentage"></span>
                                    </div><div class="info"></div>
                                    <div class="btns">
                                        <div id="filePicker2"></div><div class="uploadBtn">开始上传</div>
                                    </div>
                                </div>
                            </div>

                        </div>
                    </div>

                    <!--正文-->
                    <div class="form-group">

                        <div class="col-sm-10 col-sm-offset-1">
                            <textarea name="editor1" id="editor1" rows="10" cols="80">

                            </textarea>
                        </div>
                    </div>

                    <!--标签-->
                    <div class="form-group">

                        <div class="col-sm-10">

                        </div>
                    </div>
                    <div class="hr-line-dashed"></div>
                    <!--操作区-->
                    <div class="form-group">
                        <div class="col-sm-12">
                            <div class="col-sm-1 col-sm-offset-1">
                                <button class="btn btn-warning" type="submit">保存草稿</button>
                            </div>
                            <div class="col-sm-1">
                                <button class="btn btn-success" type="submit">预览文章</button>
                            </div>
                            <div class="col-sm-1">
                                <button class="btn btn-primary" type="submit">发布</button>
                            </div>
                        </div>
                    </div>
                </form>
            </div>

        </div>
    </div>
</div>

@stop


@section('script')
@parent
<script src="/ckeditor/ckeditor.js"></script>
<script>

    // Replace the <textarea id="editor1"> with a CKEditor
    // instance, using default configuration.
    CKEDITOR.replace('editor1');
</script>
<!-- iCheck -->
<script src="/adminv/js/plugins/iCheck/icheck.min.js"></script>
<script>
    $(document).ready(function () {
        $('.i-checks').iCheck({
            checkboxClass: 'icheckbox_square-green',
            radioClass: 'iradio_square-green'
        });
    });
</script>

<!--文件上传-->
<script type="text/javascript" src="/webuploader/webuploader.js"></script>
<script type="text/javascript" src="/webuploader/webuploaderdemo.js"></script>

<!-- Switchery -->
<script src="/adminv/js/plugins/switchery/switchery.js"></script>
<script>
    var elem = document.querySelector('.js-switch');
    var init = new Switchery(elem);
    elem.onchange = function() {console.log(elem.checked);
        if(elem.checked)
            $('.peitu').show()
        else
            $('.peitu').hide();
    };
</script>
<!-- Chosen -->
<script src="/adminv/js/plugins/chosen/chosen.jquery.js"></script>

@stop
